{% extends "templates/page.html" %}

{% block stylesheet %}
<link rel="icon" href="/console/favicon/logo-16.png" size="16x16">
<link rel="icon" href="/console/favicon/logo-32.png" size="32x32">
<link rel="icon" href="/console/favicon/logo-64.png" size="64x64">
{{ super() }}
<link rel="stylesheet" href="{{ static_url("css/primehub/primehub.css") }}" type="text/css" />
<script src="{{ static_url("components/primehub/mustache.min.js") }}" integrity="sha256-1B6REXjRTNQ4IJEUSVYbAqEDRIYP8uKNUo+QgYZUzJM=" crossorigin="anonymous"></script>
<script src="{{ static_url("components/primehub/clipboard.min.js") }}"></script>
{% endblock %}

{% block logo %}
<span id="jupyterhub-logo" class="pull-left">
  <a href="/"><img src='{{base_url}}logo' alt='PrimeHub - JupyterHub' class='jpy-logo' title='Home' style='height: 32px;'/></a>
</span>
{% endblock %}
{% block announcement %}
{% if announcement %}
<div class="container announcement">
  {{ announcement | safe }}
</div>
{% endif %}
{% endblock %}

{% block nav_bar_right_items %}
<li>
  <span class="primehub-version">
    {{ primehub_version }}
  </span>
</li>
{{ super() }}
{% endblock %}

{% block nav_bar %}
<div style="margin-bottom: 20px;"></div>
{% endblock %}

{% block script %}
{{ super() }}
<script>
  // In non in embedded mode, always go back to primehub console
  // (except spawn-pending page, please see ch12374)
  if (window.self === window.top &&
      !window.location.pathname.startsWith('/hub/spawn-pending'))
  {
    {% if user.spawner and user.spawner.launch_group %}
    window.top.location = '/console/g/{{ user.spawner.launch_group }}/hub';
    {% else %}
    window.top.location = '/console/g';
    {% endif %}
  }
</script>
{% endblock %}
